package tech.ideashare.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import tech.ideashare.dao.PostDAO;
import tech.ideashare.model.PostArticle;

import java.util.List;
import java.util.Optional;

@Controller
public class ListController extends BaseController {

    @Autowired
    private  PostDAO postDAO;

    @GetMapping("/list/{listNo}")
    public String showList(){

        List list = postDAO.findAll();
        System.out.println(list);

        logger.info("come in showList");
        return "articleList";
    }
}
